#ifndef _UITL_H_
#define _UTIL_H_

#include <string>
#include <vector>
#include <GL/glew.h>

typedef struct
{
	float XYZW[4];
	float RGBA[4];
} Vertex;

typedef struct 
{
    GLuint vertex_buffer, index_buffer;
    //GLuint textures[2];

    /* fields for shader objects ... */
} g_resource_t;

/*
	Creates a shader from the GLSL code in 'strShaderFile' with the type 'eShaderType'
	compiles it and returns the shader id.
*/
GLuint CreateShader(const std::string &strShaderFile, GLenum eShaderType); //c++

/*
	Creates the program attaches all the shaders in 'shaderList', links the program and
	returns the program id.
*/
GLuint CreateProgram(const std::vector<GLuint> &shaderList);

void make_buffer(GLuint &buffer_id, GLenum target, GLsizei buffer_size, const void *data, GLenum usage);

#endif